package com.tempjob.common.businesss.mongo.entity;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.FieldFill;
import com.anwen.mongo.enums.IdTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Version;

import java.util.Date;

/**
 * 政策申请记录
 * @author hui
 * @Date 2024/11/4 15:58
 **/
@CollectionName(value = "proclicy_apply_record")
@Data
public class PolicyApplyRecord {

    @ID(type = IdTypeEnum.OBJECT_ID)
    @CollectionField("_id")
    @ApiModelProperty("id")
    private String id;

    @CollectionField("policy_id")
    @ApiModelProperty("政策id")
    private String policyId;

    @CollectionField("apply_user_id")
    @ApiModelProperty("用户id")
    private String applyUserId;

    @CollectionField("apply_time")
    @ApiModelProperty("申请时间")
    private Date applyTime;

    @CollectionField("user_desc")
    @ApiModelProperty("用户描述")
    private String userDesc;

    @CollectionField("apply_status")
    @ApiModelProperty("申请状态:0申请1符合条件2不符合条件")
    private Integer applyStatus;

    @CollectionField("deal_remark")
    @ApiModelProperty("处理备注")
    private String dealRemark;

    @CollectionField(value = "oper_time",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间",hidden = true)
    private Date operTime;

    @CollectionField(value = "oper_id",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新人id",hidden = true)
    private Long operId;

    @CollectionField(value = "oper_name",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新人",hidden = true)
    private String operName;

    @CollectionField(value = "create_id",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人id",hidden = true)
    private Long createId;

    @CollectionField(value = "create_name",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人",hidden = true)
    private String createName;

    @CollectionField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间",hidden = true)
    private Date createTime;

    @Version
    @CollectionField("version")
    @ApiModelProperty(value = "乐观锁", hidden = true)
    private Integer version;

}
